package com.linghang.dao;

import com.linghang.pojo.Student;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface StudentMapper {
    //查询所有的学生信息以及对应的老师的信息
    @Select("select * from student")
    public List<Student> getStudent();

    @Select("select s.id sid,s.name sname,t.name tname\n" +
            "        from student s ,teacher t\n" +
            "        where s.tid = t.id")
    public List<Student> getStudent2();
}
